/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:46 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DangkykhoahocEntity
    {
        public DangkykhoahocEntity()
        {
			m_pk_idangkykhoahocid=0;
			m_fk_ikhoahocid=0;
			m_fk_ihocvienid=0;
			m_dngaydangky=DateTime.Now;
			m_itrangthai=0;
        }
		private Int64 m_pk_idangkykhoahocid;
		public Int64 PK_iDangkykhoahocID
		{
			get { return m_pk_idangkykhoahocid ; }
			set { m_pk_idangkykhoahocid = value; }
		}
		private Int64 m_fk_ikhoahocid;
		public Int64 FK_iKhoahocID
		{
			get { return m_fk_ikhoahocid ; }
			set { m_fk_ikhoahocid = value; }
		}
		private Int64 m_fk_ihocvienid;
		public Int64 FK_iHocvienID
		{
			get { return m_fk_ihocvienid ; }
			set { m_fk_ihocvienid = value; }
		}
		private DateTime m_dngaydangky;
		public DateTime dNgaydangky
		{
			get { return m_dngaydangky ; }
			set { m_dngaydangky = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}

        #region Comparison
        public static List<DangkykhoahocEntity> Sort(List<DangkykhoahocEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DangkykhoahocEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DangkykhoahocEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DangkykhoahocEntity> COMPARISON_PK_iDangkykhoahocID
		{
			get
			{
				return delegate(DangkykhoahocEntity entity,DangkykhoahocEntity other)
				{
					return entity.PK_iDangkykhoahocID.CompareTo(other.PK_iDangkykhoahocID);
				};
			}
		}
		public static Comparison<DangkykhoahocEntity> COMPARISON_FK_iKhoahocID
		{
			get
			{
				return delegate(DangkykhoahocEntity entity,DangkykhoahocEntity other)
				{
					return entity.FK_iKhoahocID.CompareTo(other.FK_iKhoahocID);
				};
			}
		}
		public static Comparison<DangkykhoahocEntity> COMPARISON_FK_iHocvienID
		{
			get
			{
				return delegate(DangkykhoahocEntity entity,DangkykhoahocEntity other)
				{
					return entity.FK_iHocvienID.CompareTo(other.FK_iHocvienID);
				};
			}
		}
		public static Comparison<DangkykhoahocEntity> COMPARISON_dNgaydangky
		{
			get
			{
				return delegate(DangkykhoahocEntity entity,DangkykhoahocEntity other)
				{
					return entity.dNgaydangky.CompareTo(other.dNgaydangky);
				};
			}
		}
		public static Comparison<DangkykhoahocEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(DangkykhoahocEntity entity,DangkykhoahocEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
        #endregion
    }
}
